<?php
//dbconnector.php
//author: newton chan
//For security safeguard this file:
// - must be stored in secured folder with no web access
// - must NOT be stored in the same folder as the one the web client is served from

//Define the mysql connection variables.
define('MYSQLHOST','localhost');//MySQL host name
define('MYSQLUSER','mazaika1');//database username
define('MYSQLPASS','11073276');//database password
define('MYSQLDB','mazaika1');//database name
function opendb()
{
	$db=mysql_connect(MYSQLHOST,MYSQLUSER,MYSQLPASS) or
		die('Could not connect: <font color="red">'.mysql_error().'</font>');
	mysql_select_db(MYSQLDB,$db);
	return $db;
}
?>
